package com.tudouji.project.d3.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.tudouji.project.d3.domain.D3Order;
import com.tudouji.project.d3.domain.D3OrderItem;
import com.tudouji.project.d3.domain.D3ToSellform;

/**
 * 平台订单中间Mapper接口
 * 
 * @author tudouji
 * @date 2023-04-10
 */
public interface D3ToSellformMapper 
{
    /**
     * 查询平台订单中间
     * 
     * @param id 平台订单中间ID
     * @return 平台订单中间
     */
    public D3ToSellform selectD3ToSellformById(Long id);

    /**
     * 查询平台订单中间列表
     * 
     * @param d3ToSellform 平台订单中间
     * @return 平台订单中间集合
     */
    public List<D3ToSellform> listPc(D3ToSellform d3ToSellform);
    public List<D3ToSellform> selectD3ToSellformList(D3ToSellform d3ToSellform);
    public List<D3ToSellform> selectD3ToSellformListGroupByItem(D3ToSellform d3ToSellform);

    /**
     * 新增平台订单中间
     * 
     * @param d3ToSellform 平台订单中间
     * @return 结果
     */
    public int insertD3ToSellform(D3ToSellform d3ToSellform);

    /**
     * 修改平台订单中间
     * 
     * @param d3ToSellform 平台订单中间
     * @return 结果
     */
    public int updateD3ToSellform(D3ToSellform d3ToSellform);

    /**
     * 删除平台订单中间
     * 
     * @param id 平台订单中间ID
     * @return 结果
     */
    public int deleteD3ToSellformById(Long id);
    public int deleteD3ToSellformByD3(D3ToSellform d3ToSellform);

    /**
     * 批量删除平台订单中间
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteD3ToSellformByIds(Long[] ids);


    List<D3ToSellform> preparedForSellItems(D3ToSellform d3ToSellform);
    List<D3ToSellform> selectProductType(D3ToSellform d3ToSellform);

    List<D3Order> preparedForD3Orders(D3ToSellform d3ToSellform);
    Integer preparedForD3OrderItems(D3ToSellform d3ToSellform);

    BigDecimal preparedForSellformAmount(D3ToSellform d3ToSellform);
    Integer getNumSum(D3ToSellform d3ToSellform);
    String getMaxShippingTime(D3ToSellform d3ToSellform);
    String getMinShippingTime(D3ToSellform d3ToSellform);
    List<D3ToSellform> getNumSumGroup(D3ToSellform d3ToSellform);
    Long selectMaxD3OrderId();

    List<D3ToSellform> selectD3ToSellformListGroupBy(D3ToSellform d3ToSellform);
}
